/* 
 * 云打印系统 - 主样式文件
 * 遵循现代大厂设计规范
 */

:root {
    --primary-color: #0e88eb;
    --primary-light: #57a0ff;
    --primary-dark: #0b5ca0;
    --secondary-color: #13c2c2;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #f5222d;
    --info-color: #1890ff;
    
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-hint: #8c8c8c;
    --text-disabled: #bfbfbf;
    
    --background-light: #f5f7f9;
    --background-gray: #f0f2f5;
    --background-white: #ffffff;
    
    --border-color: #e8e8e8;
    --border-radius-sm: 4px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    --transition-fast: 0.15s;
    --transition: 0.3s;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
}

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 500;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* 布局组件 */
.header {
    padding: var(--spacing) 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: var(--shadow);
}

.header h1 {
    color: white;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    font-size: 1.8rem;
}

.header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.content-wrapper {
    padding: var(--spacing);
}

/* 卡片组件 */
.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    transition: all var(--transition);
    background-color: var(--background-white);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
    padding: var(--spacing);
}

.card-body {
    padding: var(--spacing);
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all var(--transition);
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 136, 235, 0.3);
}

.btn-primary:active {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(0);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 136, 235, 0.3);
}

/* 美化上传按钮 */
.btn-upload {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 50px;
    padding: 10px 24px;
    border: none;
    box-shadow: 0 4px 15px rgba(14, 136, 235, 0.35);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-upload::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--primary-light), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-upload:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 8px 20px rgba(14, 136, 235, 0.45);
}

.btn-upload:hover::before {
    opacity: 1;
}

.btn-upload:active {
    transform: translateY(0) translateZ(0);
    box-shadow: 0 4px 8px rgba(14, 136, 235, 0.35);
}

.btn-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.btn-icon-wrapper i {
    font-size: 1.2rem;
    margin-right: 0;
    position: relative;
    top: -1px;
}

.btn-text {
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.btn-sub-text {
    opacity: 0.8;
    font-size: 0.9em;
    margin-left: 4px;
    position: relative;
    z-index: 1;
}

.btn-upload:hover .btn-icon-wrapper {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.btn-upload:hover .btn-text {
    transform: translateX(3px);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 动画效果 - 波纹 */
.btn-upload::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn-upload:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* 上传区域 */
.upload-area {
    border: 2px dashed var(--primary-light);
    background-color: rgba(87, 160, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(87, 160, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.upload-area:hover, .upload-area.dragover {
    background-color: rgba(87, 160, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(87, 160, 255, 0.15);
}

.upload-area:hover::before, .upload-area.dragover::before {
    opacity: 1;
    transform: scale(1);
}

.upload-area i {
    font-size: calc(26px + 1vw);
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    transition: all 0.35s ease;
    display: inline-block;
    filter: drop-shadow(0 2px 5px rgba(14, 136, 235, 0.3));
}

.upload-area:hover i, .upload-area.dragover i {
    transform: translateY(-5px) scale(1.1);
    color: var(--primary-color);
    filter: drop-shadow(0 5px 10px rgba(14, 136, 235, 0.4));
}

.upload-area h4 {
    font-size: calc(1.1rem + 0.2vw);
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.upload-area:hover h4, .upload-area.dragover h4 {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* 文件列表 */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    background-color: var(--background-light);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    transition: all var(--transition-fast);
}

.file-item:hover {
    box-shadow: var(--shadow);
    background-color: white;
}

.file-info {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xs);
    width: 100%;
}

@media (min-width: 576px) {
    .file-info {
        width: auto;
        margin-bottom: 0;
    }
}

.file-icon {
    margin-right: var(--spacing-sm);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.file-name {
    font-weight: 500;
    word-break: break-all;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 576px) {
    .file-name {
        max-width: 300px;
    }
}

.file-size {
    color: var(--text-hint);
    font-size: 0.85em;
    margin-left: var(--spacing-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: var(--spacing-xs);
}

@media (min-width: 576px) {
    .status-indicator {
        width: auto;
        margin-top: 0;
        flex-wrap: nowrap;
    }
}

.status-icon {
    margin-right: var(--spacing-xs);
}

.status-text {
    font-size: 0.85em;
    margin-right: var(--spacing-sm);
    color: var(--text-secondary);
}

/* 状态颜色 */
.status-success {
    color: var(--success-color);
}

.status-error {
    color: var(--error-color);
}

.status-warning {
    color: var(--warning-color);
}

.status-pending {
    color: var(--info-color);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(14, 136, 235, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 移动导航栏样式 */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 12px;
  width: 70px;
  height: 50px;
}

.mobile-nav-item .bi::before {
  font-size: 2rem;  /* 更大的图标 */
  margin: 0 0 4px 0;
  transition: transform 0.3s ease, color 0.3s ease;
  display: block;
  text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.mobile-nav-item:hover .bi::before,
.mobile-nav-item.active .bi::before {
  transform: scale(1.2);
  color: var(--primary);
}

.mobile-nav-item span {
  font-size: 11px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px var(--primary);
}

.mobile-nav-item:hover::before,
.mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45px;
  height: 45px;
  background-color: rgba(var(--primary-rgb), 0.1);
  border-radius: 50%;
  z-index: -1;
  animation: pulse 1.5s infinite;
  opacity: 0.7;
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.7;
  }
}

/* 触摸设备的优化 */
@media (hover: none) {
  .mobile-nav-item:active .bi::before {
    transform: scale(1.2);
    color: var(--primary);
  }
  
  .mobile-nav-item:active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background-color: rgba(var(--primary-rgb), 0.1);
    border-radius: 50%;
    z-index: -1;
  }
}

/* 响应式调整 */
@media (max-width: 767px) {
    body {
        padding-bottom: 70px;
    }
    
    .content-wrapper {
        padding: var(--spacing-sm);
    }
    
    .card {
        margin-bottom: var(--spacing);
    }
    
    .card-body, .card-header {
        padding: var(--spacing-sm);
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    h4, h5 {
        font-size: 1.1rem;
    }
}

/* 表单控件 */
.form-control, .form-select {
    border-color: var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(87, 160, 255, 0.25);
}

.input-group {
    margin-bottom: var(--spacing-sm);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 内容区域显示逻辑 */
.content-section {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.content-section.active {
    display: block;
}

/* 警告提示 */
.alert {
    border-radius: var(--border-radius);
    margin-top: var(--spacing);
    padding: var(--spacing-sm) var(--spacing);
    border: none;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}

.alert-warning {
    background-color: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.alert-info {
    background-color: rgba(24, 144, 255, 0.1);
    color: var(--info-color);
}

/* 辅助类 */
.hidden {
    display: none !important;
}

.small {
    font-size: 0.875em;
}

.bg-light {
    background-color: var(--background-light) !important;
}

.text-muted {
    color: var(--text-hint) !important;
}

.rounded {
    border-radius: var(--border-radius) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.fw-bold {
    font-weight: 600 !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--error-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

/* 状态徽章样式 */
.status-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-badge.status-pending {
    background-color: rgba(24, 144, 255, 0.1);
    color: var(--info-color);
}

.status-badge.status-success {
    background-color: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.status-badge.status-warning {
    background-color: rgba(250, 173, 20, 0.1);
    color: var(--warning-color);
}

.status-badge.status-error {
    background-color: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}

/* 文件列表加强样式 */
.file-item {
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.file-item:hover {
    transform: translateX(2px);
    border-left-color: var(--primary-color);
}

.time-stamp {
    font-size: 0.8rem;
    color: var(--text-hint);
    white-space: nowrap;
}

/* 更多文件提示样式 */
.text-end.text-muted.mt-2.small {
    padding: 0.5rem 1rem;
    font-style: italic;
    border-top: 1px dashed var(--border-color);
} 